import { Injectable, NestInterceptor } from "@nestjs/common";
import{ map } from "rxjs/operators";

@Injectable()
export class Response<T> implements NestInterceptor{
    intercept(context: any, next: any): any {
        return next.handle().pipe(map(data=>{
            return {
                data,
                success:true,
            }
        }));
    }
}